package org.example.mall.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.mall.entity.User;

@Mapper
public interface UserMapper {
    
    int insert(User user);
    
    User selectById(Long id);
    
    User selectByPhone(String phone);
    
    User selectByUsername(String username);
    
    int updateUserInfo(User user);
    
    int updatePassword(@Param("id") Long id,
                      @Param("oldPassword") String oldPassword,
                      @Param("newPassword") String newPassword,
                      @Param("updateTime") String updateTime);
} 